/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface MoOrderApplyH extends BasicModel<MoOrderApplyH> {
  code?: string; // 退料单号
  cinvcode?: string; // 存货编码
  mdeptcode?: string; // 部门编码
  auditor?: string; // 审核人
  auditDate?: string; // 审核日期
  auditStatus?: string; // 审核状态
  sourceid?: string; // 来源ID
  moOrderReturnCList?: any[]; // 子表列表
}

export const MoOrderApplyHList = (params?: MoOrderApplyH | any) =>
  defHttp.get<MoOrderApplyH>({ url: adminPath + '/mo/tl/MoOrderApplyH/list', params });

export const MoOrderApplyHListData = (params?: MoOrderApplyH | any) =>
  defHttp.post<Page<MoOrderApplyH>>({ url: adminPath + '/mo/tl/MoOrderApplyH/listData', params });

export const MoOrderApplyHForm = (params?: MoOrderApplyH | any) =>
  defHttp.get<MoOrderApplyH>({ url: adminPath + '/mo/tl/MoOrderApplyH/form', params });

export const MoOrderApplyHSave = (params?: any, data?: MoOrderApplyH | any) =>
  defHttp.postJson<MoOrderApplyH>({ url: adminPath + '/mo/tl/MoOrderApplyH/save', params, data });

export const MoOrderApplyHDelete = (params?: MoOrderApplyH | any) =>
  defHttp.get<MoOrderApplyH>({ url: adminPath + '/mo/tl/MoOrderApplyH/delete', params });
